App({
  onLaunch() {
    const logs = wx.getStorageSync('logs') || []
    logs.unshift(Date.now())
    wx.setStorageSync('logs', logs)

    // 登录
    wx.login({
      success: res => {
        // 发送 res.code 到后台换取 openId, sessionKey, unionId
      }
    })
  },
  globalData: {
    user:{
      openid: '',
      isLogin: false,
      nickName: '',
      avatarUrl: '',
      
    },
    //用户基本信息，初始数据
    userGender:1,
    userAge:0,
    userDisabilityType:"未获得",
    userDisabilityCause:"未获得",
    userDisabilityLevel:0,
    userBehaviorScore:[],
    userBehaviorPhase:0,
    //可选择的基本信息
    userInfo: null,
    scores:{
      "turnOverScore": 0,
      "sitScore": 0,
      "standScore": 0,
      "transferScore": 0,
      "moveScore": 0,
      "upAndDownStairsScore": 0,
      "eatScore": 1,
      "wearScore": 0,
      "bathScore": 0,
      "toiletUsingScore": 0,
      "communicationScore": 0,
      "houseworkScore": 0,
      "activityScore": 0,
    },
    myStage:'',
    plan:{},
    dataset:{},
    totalScore: 0,
    isRecord: false,
    isLoaded: false
  }

})
